package hsh.command;

import hsh.gui.LashVisualInterface;
import hsh.setintructions.GET;
import hsh.setintructions.GO;
import hsh.setintructions.Instruction;
import hsh.setintructions.LOCALIZE;
import hshs.process.Program;
import hshsm.managers.Scheduler;

import java.util.ArrayList;
import java.util.List;

public class CleanRoomCommad implements Command{

	
	
	

	private Scheduler scheduler;
	private String paramenter;
	private LashVisualInterface gui;
	
	public CleanRoomCommad( Scheduler scheduler,LashVisualInterface gui,String paramenter ) {
		this.scheduler = scheduler;
		this.paramenter = paramenter;
		this.gui = gui;
	}
	

	public void execute() {
		
		System.out.println("Executing Cammmand");
		
	
		
		GET alocar = new GET("robo",gui);
		GO go1 = new GO(this.paramenter,gui);
		LOCALIZE l1 = new LOCALIZE("Vassoura",gui);
		GET take = new GET("Vassoura",gui);
		
		
		List<Instruction> program = new ArrayList<Instruction>();
		program.add(alocar);
		program.add(go1);
		program.add(l1);
		
		//program.add(on);
		
		Program washClothesProgram =new Program(program);
		System.out.println("------------>");
		scheduler.addNewProcess(washClothesProgram);
	}

}
